<?php
class Test_ctl extends Ctl{
//     public function __construct(){

//     }
    function main(array $getVars) {
        $type=!empty($_POST['type'])?$_POST['type']:false;
		if(!$type){
			echo $this::show("test");
		}else if($type=="upload"){
			$targetPath = XXF_ROOT.'html\\uploader\\kejian'; // 指定的保存目录
			//$targetPath = 'E:';
            if (!empty($_FILES)) {
                $tempFile = $_FILES['file']['tmp_name'];
                //$fileParts = pathinfo($_FILES['file']['name']);
                $filename=XXF_UID.time().".rar";//生成文件名
                $targetFile = rtrim($targetPath,'/') . '\\' .$filename;
				move_uploaded_file($tempFile,$targetFile);//保存文件到指定目录
				echo $_POST['fileSize'];
            }
		}
    }
}